<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="assets/css/bootstrap.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="assets/css/font-awesome.min.css" />
    <!--[if IE 7]>
    <link rel="stylesheet" href="assets/css/font-awesome-ie7.min.css" />
    <![endif]-->
    <link rel="stylesheet" href="assets/css/ace.min.css" />
    <link rel="stylesheet" href="css/style.css"/>
    <script src="assets/js/jquery.min.js"></script>

    <script src="assets/layer/layer.js" type="text/javascript"></script>
    <title>供应商管理</title>
</head>
<style type="text/css">

    .control-group{
        line-height: 20px;
        color: #555;
        font-family: Helvetica, Georgia, Arial, sans-serif, 宋体;
        font-size: 13px;
        padding-bottom: 8px;
        border-bottom: 1px dotted #dddddd;
        margin-bottom: 8px;
    }

</style>
<body>


<div class="page-content">
<div class="gys_style">



    <div class="Manager_style">
        <form  th:action="@{/text1}" method="post" >
            <span class="title_name">法规目录列表</span>
            <!--<div class="controls">-->
            <div class="control-group">
                选择法规:
                <select style="margin-left: 10px;" name="lawsId">
                    <option value="0">---请选择---</option>
                    <option option th:each="list:${laws1}" th:text="${list.lawsName}" th:value="${list.id}"></option>
                </select>
                <script>
                    $(function () {
                        $('select').searchableSelect();
                    })
                </script>
                <input type="submit" value="查询"/>

            </div>
        </form>
     <table class="table table-striped table-bordered table-hover">
     <thead>
       <tr>
        <td>目录名称</td>
           <td>排序</td>
           <td>操作</td>
       </tr>
      </thead>
      <tbody>
       <tr th:each="li:${pageInfo.list}">
           <td>
           <div class="list">
         <ul class="yiji" >
            <li><span style="color: red" th:if="${!li.branch.isEmpty()}">*</span><span style="color: red" th:if="${li.branch.isEmpty()}">&nbsp;</span><a href="###" style="color: black"  th:text="${li.directoryName}" class="inactive" ></a>
                <ul style="display: none" th:each="a:${li.branch}">
                     <li><span style="color: red" th:if="${!a.menus.isEmpty()}">*</span><span style="color: red" th:if="${a.menus.isEmpty()}">&nbsp;</span><a href="###" style="color: black" th:text="${a.branchName}"  class="inactive active"></a>
                        <ul th:each="b:${a.menus}">
                            <li><a href="###" th:text="${b.menuName}" style="color: black"></a>
                        </ul>
                    </li>
                </ul>
            </li>
        </ul>
    </div>
           </td>
             <td>
               <div class="list">
                   <ul class="yiji" >
                       <li><span  th:if="${!li.branch.isEmpty()}"></span><span th:if="${li.branch.isEmpty()}">&nbsp;</span><a href="###" style="color: black"  th:text="${li.directorySorting}" class="inactive2" ></a>
                           <ul style="display: none" th:each="a:${li.branch}">
                               <li><span  th:if="${!a.menus.isEmpty()}"></span><span  th:if="${a.menus.isEmpty()}">&nbsp;</span><a href="###" style="color: black" th:text="${a.branchSorting}"  class="inactive active"></a>
                                   <ul th:each="b:${a.menus}">
                                       <li><a href="###" style="color: black" th:text="${b.menuSorting}"></a>

                                   </ul>
                               </li>
                           </ul>
                       </li>
                   </ul>
               </div>

           </td>
            <td>
               <div class="list">
                   <ul class="yiji" >
                       <li><span  th:if="${!li.branch.isEmpty()}"></span><span th:if="${li.branch.isEmpty()}">&nbsp;</span><a href="###"   class="inactive3" ></a>
                             <a style="color: blue" th:href="@{/test7/}+${li.id}">修改</a>  <a style="color: blue" >删除</a>   <a style="color: blue" th:href="@{/test5/}+${li.id}">添加下级目录</a>
                           <ul style="display: none" th:each="a:${li.branch}">
                               <li><span  th:if="${!a.menus.isEmpty()}"></span><span  th:if="${a.menus.isEmpty()}">&nbsp;</span><a href="###"   class="inactive active"></a>

                                   <a style="color: blue" th:href="@{/test8(id=${a.id},id2=${li.id})}">修改</a>  <a style="color: blue" >删除</a>   <a style="color: blue"th:href="@{/test6/}+${a.id}">添加下级目录</a>

                                   <ul th:each="b:${a.menus}">
                                       <li>
                                           <a style="color: blue" th:href="@{/test9(id=${b.id},id3=${li.id})}">修改</a>  <a style="color: blue" >删除</a> <a style="color: blue" >添加下级目录</a>

                                       </li>
                                   </ul>
                               </li>
                           </ul>
                       </li>
                   </ul>
               </div>
           </td>
       </tr>

      </tbody>
     </table>

  </div>
 </div>
</div>



<script>

        $('.inactive').click(function () {
            if ($(this).siblings('ul').css('display') == 'none') {
                $(this).siblings('ul').slideDown(100).children('li');
                $('.inactive2').siblings('ul').slideDown(100).children('li');
                $('.inactive3').siblings('ul').slideDown(100).children('li');

            } else {
                $(this).siblings('ul').slideUp(100);
                $('.inactive2').siblings('ul').slideUp(100);
                $('.inactive3').siblings('ul').slideUp(100);

            }
        })
</script>
<script type="text/javascript">
    $('#Add_Product_btn').on('click', function(){
        layer.open({
            type: 1,
            title: '添加目录',
            shadeClose: true, //点击遮罩关闭层
            area: ['600px' , ''],
            content: $('#Add_Product_style'),
            btn:['提交','取消'],
            yes: function(index, layero){
                if($("#name_text").val()==""){
                    layer.alert('目录名称不能为空!',{
                        title: '提示框',
                        icon:0,
                    });
                    return false;
                }
                else{
                    layer.alert('添加成功！',{
                        title: '提示框',
                        icon:1,
                    });
                    layer.close(index);
                }
            }
        })
    });

</script>
<script>
    $('#Add_Product_btn1').on('click', function(){
    layer.open({
        type: 1,
        title: '添加目录',
        shadeClose: true, //点击遮罩关闭层
        area: ['600px' , ''],
        content: $('#Add_Product_style'),
        btn:['提交','取消'],
        yes: function(index, layero){
            if($("#name_text1").val()==""){
                layer.alert('目录名称不能为空!',{
                    title: '提示框',
                    icon:0,
                });
                return false;
            }
            else{
                layer.alert('添加成功！',{
                    title: '提示框',
                    icon:1,
                });
                layer.close(index);
            }
        }
    })
});

</script>
<script>
    $('#Add_Product_btn2').on('click', function(){
    layer.open({
        type: 1,
        title: '添加目录',
        shadeClose: true, //点击遮罩关闭层
        area: ['600px' , ''],
        content: $('#Add_Product_style'),
        btn:['提交','取消'],
        yes: function(index, layero){
            if($("#name_text2").val()==""){
                layer.alert('目录名称不能为空!',{
                    title: '提示框',
                    icon:0,
                });
                return false;
            }
            else{
                layer.alert('添加成功！',{
                    title: '提示框',
                    icon:1,
                });
                layer.close(index);
            }
        }
    })
});
</script>
</body>
</html>
